package com.mc.provider.service.hello;

import cn.hutool.json.JSONUtil;
import com.mc.mic.core.provider.IMicProviderServiceExecutor;
import com.mc.provider.param.HelloRequestParam;
import com.mc.provider.param.HelloResponseParam;
import org.springframework.stereotype.Service;

/**
 * Hello的服务执行器
 *
 * @author Liu Chunfu
 * @date 2018/1/3
 */
@Service
public class HelloMicServiceExecutor implements IMicProviderServiceExecutor<HelloRequestParam, HelloResponseParam> {

    @Override
    public HelloResponseParam doExecute(HelloRequestParam cmdParam) {
        //业务逻辑。。。。
        HelloResponseParam resultParam = new HelloResponseParam();
        resultParam.setName(cmdParam.getContent() + "Hello，LCF");
        System.err.println(JSONUtil.toJsonPrettyStr(resultParam));
        return resultParam;
    }
}
